package Day07_24;

public class Room extends Object{
    private int roomNumber;
    private String roomType;
    private boolean roomFree;

    public Room(int roomNumber, String roomType, boolean roomFree) {

        this.roomNumber = roomNumber;
        this.roomType = roomType;
        this.roomFree = roomFree;
    }

    public Room() {

    }

    public int getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(int roomNumber) {
        this.roomNumber = roomNumber;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public boolean getRoomFree() {
        return roomFree;
    }

    public void setRoomFree(boolean roomFree) {
        this.roomFree = roomFree;
    }
    public boolean equals(Object obj) {
        if(obj==null || !(obj instanceof Room) ) return false;
        if(obj == this )  return true;
        Room room = (Room) obj;
        return this.roomNumber == room.getRoomNumber();
    }
    public String toString() {
        return this.roomNumber+this.roomType+this.roomFree;
    }
}
